Only OSTREE_ADMIN_BUILTIN_FLAG_NONE so far; does nothing.
context = g_option_context_new ("Delete untagged deployments and repository objects");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = g_option_context_new ("REFSPEC - Checkout revision REFSPEC as the new default deployment");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc < 2)
g_option_context_add_main_entries (context, options, NULL);
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = g_option_context_new ("PATH - Initialize a root filesystem");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc < 2)
context = ostree_admin_instutil_option_context_new_with_commands ();
/* This will not return for some options (e.g. --version). */
- if (ostree_admin_option_context_parse (context, NULL, &argc, &argv, NULL, cancellable, error))
+ if (ostree_admin_option_context_parse (context, NULL, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ NULL, cancellable, error))
{
if (subcommand_name == NULL)
{
context = g_option_context_new ("OSNAME - Initialize empty state for given operating system");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_ensure_initialized (sysroot, cancellable, error))
context = g_option_context_new ("REMOTENAME URL [BRANCH]");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc < 3)
context = g_option_context_new ("List deployments");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = g_option_context_new ("REF - Construct new tree from current origin and deploy it, if it changed");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc < 2)
context = g_option_context_new ("INDEX - Delete deployment INDEX");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc < 2)
context = g_option_context_new ("Construct new tree from current origin and deploy it, if it changed");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = g_option_context_new ("[BOOTVERSION] - generate GRUB2 configuration from given BLS entries");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (argc >= 2)
context = g_option_context_new ("[SUBPATH PREFIX] - relabel all or part of a deployment");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = g_option_context_new ("ARGS - set new kernel command line arguments");
- if (!ostree_admin_option_context_parse (context, options, &argc, &argv, &sysroot, cancellable, error))
+ if (!ostree_admin_option_context_parse (context, options, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ &sysroot, cancellable, error))
goto out;
if (!ostree_sysroot_load (sysroot, cancellable, error))
context = ostree_admin_option_context_new_with_commands ();
/* This will not return for some options (e.g. --version). */
- if (ostree_admin_option_context_parse (context, NULL, &argc, &argv, NULL, cancellable, error))
+ if (ostree_admin_option_context_parse (context, NULL, &argc, &argv,
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE,
+ NULL, cancellable, error))
{
if (subcommand_name == NULL)
{
const GOptionEntry *main_entries,
int *argc,
char ***argv,
+ OstreeAdminBuiltinFlags flags,
OstreeSysroot **out_sysroot,
GCancellable *cancellable,
GError **error)
OSTREE_BUILTIN_FLAG_NO_CHECK = 1 << 1
} OstreeBuiltinFlags;
+typedef enum {
+ OSTREE_ADMIN_BUILTIN_FLAG_NONE = 0,
+} OstreeAdminBuiltinFlags;
+
typedef struct {
const char *name;
gboolean (*fn) (int argc, char **argv, GCancellable *cancellable, GError **error);
gboolean ostree_admin_option_context_parse (GOptionContext *context,
const GOptionEntry *main_entries,
int *argc, char ***argv,
+ OstreeAdminBuiltinFlags flags,
OstreeSysroot **out_sysroot,
GCancellable *cancellable, GError **error);